import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const GPMG: AppRouteRecordRaw = {
  path: '/question-management',
  name: 'question-management',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.question-management',
    requiresAuth: true,
    icon: 'icon-list',
    order: 6,
  },
  children: [
    {
      path: 'search-table', // The midline path complies with SEO specifications
      name: 'QuestionSearchTable',
      component: () =>
        import('@/views/question-management/search-table/index.vue'),
      meta: {
        locale: 'menu.question-management.searchTable',
        requiresAuth: true,
        roles: ['admin', 'user'],
      },
    },
    {
      path: 'create-question',
      name: 'QuestionCreateQuestion',
      component: () =>
        import('@/views/question-management/create-question/index.vue'),
      meta: {
        locale: 'menu.question-management.title',
        requiresAuth: true,
        roles: ['admin', 'user'],
      },
    },
  ],
};

export default GPMG;
